package com.letao.rest.controller;

import com.letao.common.pojo.LetaoResult;
import com.letao.rest.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by Administrator on 2017/1/19.
 */
@Controller
@RequestMapping("/cache/sync")
public class RedisController {
    @Autowired
    private RedisService redisService;

    @RequestMapping("/content/{contentCid}")
    public LetaoResult contentCacheSync(@PathVariable Long contentCid) {
        LetaoResult result = redisService.syncContent(contentCid);
        return result;
    }


}
